class Comment < ActiveRecord::Base
  belongs_to :document
  belongs_to :user

  default_scope order('created_at ASC')

  validates_presence_of :document, :user
  validates :body, :presence => true,
                   :length => {:within => 1..1000}  # TODO html tags! custom validation?
end
